INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

SET(LIB_NAME OCMain)

SET(TARGET_H
	Prerequisites.h
	Thread/DefaultWorkQueue.h
	Thread/DefaultWorkQueueBase.h
	Thread/Request.h
	Thread/RequestHandler.h
	Thread/RequestHandlerHolder.h
	Thread/Response.h
	Thread/ResponseHandler.h
	Thread/WorkQueue.h
	Thread/WorkQueueThread.h
	Thread/Any.h
	zip/unzip.h
	zip/BZip2.h
	zip/gzstream.h
	gif/cgif_raw.h
	gif/cgif.h
	bcrypt/bcrypt.h
	bcrypt/aes.h
	bcrypt/base64.h
	sqlite3/sqlite3pp.h
	sqlite3/sqlite3ppext.h
	HttpClient.h
	StdHeaders.h
	StringUtil.h
	StringConverter.h
	FileUtil.h
	Environment.h
	DynLib.h
	DynLibManager.h
	SimpleIni.h
	ApplicationUsage.h
	ArgumentParser.h
	ZipUtil.h
	DataStream.h
	Codec.h
	Bitwise.h
    PixelFormat.h
    ColourValue.h
    ImageCodec.h
    Image.h
    Common.h
    MurmurHash3.h
    OCMath.h
    Matrix3.h
    Matrix4.h
    Vector.h
    Quaternion.h
    AxisAlignedBox.h
    Ray.h
    Plane.h
    PlaneBoundedVolume.h
    Sphere.h
    Rectangle.h
	ConvertUTF.h
	Log.h
	LogStream.h
	Timer.h
	Date.h
	cnpy.h
	CommandTool.h
	GifUtil.h
)

SET(TARGET_SRC
	Thread/DefaultWorkQueue.cpp
	Thread/DefaultWorkQueueBase.cpp
	Thread/Request.cpp
	Thread/RequestHandlerHolder.cpp
	Thread/Response.cpp
	Thread/WorkQueue.cpp
	Thread/WorkQueueThread.cpp
	zip/unzip.c
	zip/ioapi.cpp
	zip/BZip2.cpp
	zip/bz2/blocksort.c
	zip/bz2/bzlib.c
	zip/bz2/compress.c
	zip/bz2/crctable.c
	zip/bz2/decompress.c
	zip/bz2/huffman.c
	zip/bz2/randtable.c
	zip/gzstream.cpp
	gif/cgif_raw.c
	gif/cgif_rgb.c
	gif/cgif.c
	bcrypt/bcrypt.cpp
	bcrypt/blowfish.cpp
	bcrypt/aes.cpp
	bcrypt/base64.cpp
	sqlite3/sqlite3ppext.cpp
	sqlite3/sqlite3pp.cpp
	src/HttpClient.cpp
	src/StringUtil.cpp
	src/StringConverter.cpp
	src/FileUtil.cpp
	src/Environment.cpp
	src/DynLib.cpp
	src/DynLibManager.cpp
	src/ApplicationUsage.cpp
	src/ArgumentParser.cpp
	src/ZipUtil.cpp
	src/DataStream.cpp
    src/Codec.cpp
    src/Image.cpp
    src/MurmurHash3.cpp
    src/ColourValue.cpp
    src/PixelFormat.cpp
	src/OCMath.cpp
	src/Matrix3.cpp
	src/Matrix4.cpp
	src/Vector.cpp
	src/Quaternion.cpp
	src/AxisAlignedBox.cpp
	src/Rectangle.cpp
	src/ConvertUTF.cpp
	src/Log.cpp
	src/LogStream.cpp
	src/Date.cc
	src/cnpy.cpp
	src/CommandTool.cpp
	src/GifUtil.cpp
)

SETUP_GROUP()

IF(WIN32)
	SET(TARGET_EXTERNAL_LIBRARIES 
		curl
		zlib
		sqlite3
	)
ELSE(WIN32)
	SET(TARGET_EXTERNAL_LIBRARIES 
		curl
		z
		sqlite3
	)
ENDIF(WIN32)

SETUP_LIBRARY(${LIB_NAME})
